package com.dongdongsongcan.app.view;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.dongdongsongcan.app.R;
import com.dongdongsongcan.app.common.DDConstant;
import com.dongdongsongcan.app.control.bean.AddressData;
import com.dongdongsongcan.app.control.bean.OrderDetailData;
import com.dongdongsongcan.app.db.bean.ShoppingCarDBBean;
import com.su.dolphin.utils.ViewUtil;

public class OrderDetailFoodItem extends BaseViewItem<OrderDetailData.Food> {

    private final TextView mOrderinfo_foodname;
    private final TextView mOrderinfo_pkgprice;

    public OrderDetailFoodItem(Context context) {
        mContainer = ViewUtil
                .inflateView(R.layout.layout_orderinfo_fooditem, context);
        mOrderinfo_foodname = (TextView) mContainer
                .findViewById(R.id.orderinfo_foodname);
        mOrderinfo_pkgprice = (TextView) mContainer
                .findViewById(R.id.orderinfo_pkgprice);
    }

    public void setInfo(OrderDetailData.Food shoppingCarDBBean) {
        if (shoppingCarDBBean == null) {
            return;
        }
//        mOrderinfo_foodname.setText(shoppingCarDBBean.getMenu_title());
//        mOrderinfo_pkgprice.setText(shoppingCarDBBean.getMenu_price() + "");

        mOrderinfo_foodname.setText(shoppingCarDBBean.getMenu_title() + "    x" + shoppingCarDBBean.getMenu_num() + "    " + DDConstant.RMB + shoppingCarDBBean.getMenu_price());
       // mOrderinfo_pkgprice.setText("    x" + shoppingCarDBBean.getMenu_num() + "    " + DDConstant.RMB + shoppingCarDBBean.getMenu_price());

    }

}
